import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import { reqGetToken } from './api/data';
const getToken = async()=>{
  localStorage.removeItem('cjsspToken')
  let result = await reqGetToken()
  if(result.code===200){
    localStorage.setItem('cjsspToken', JSON.stringify(result.data))
  }
}
Vue.use(ElementUI);
Vue.config.productionTip = false
new Vue({
  beforeCreate(){
    getToken()
  },
  router,
  store,
  render: function (h) { return h(App) }
}).$mount('#app')
